<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Java Servlet SAPI</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="java.constants.html">预定义常量</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="java.examples.html">范例</a></div>
 <div class="up"><a href="book.java.html">Java</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="java.servlet" class="chapter">
 <h1>Java Servlet SAPI</h1>

 <p class="para">
  The Java Servlet SAPI builds upon the mechanism defined by the Java
  extension to enable the entire PHP processor to be run as a servlet.
  The primary advantage of this from a PHP perspective is that web servers
  which support servlets typically take great care in pooling and reusing
  JVMs. Build instructions for the Servlet SAPI module can be found in 
  <var class="filename">php4/sapi/README</var>.

  Notes:

  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     While this code is intended to be able to run on any servlet engine,
     it has only been tested on Apache&#039;s Jakarta/tomcat to date. Bug
     reports, success stories and/or patches required to get this code
     to run on other engines would be appreciated.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     PHP has a habit of changing the working directory. sapi/servlet will
     eventually change it back, but while PHP is running the servlet engine
     may not be able to load any classes from the CLASSPATH which are
     specified using a relative directory syntax, or find the work directory
     used for administration and JSP compilation tasks.
    </span>
   </li>
  </ul>
 </p>
</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="java.constants.html">预定义常量</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="java.examples.html">范例</a></div>
 <div class="up"><a href="book.java.html">Java</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
